<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/themes/bootstrap/easyui.css" />
<link type="text/css"
	href="${pageContext.request.contextPath}/themes/icon.css"
	rel="stylesheet">
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery-1.9.1.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/jquery.easyui.min.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/easyui-lang-zh_CN.js"></script>
</head>
<script type="text/javascript">
$(function(){
	$('#cc').combotree({    
	    url: 'alltree',    
	    panelHeight:'auto',
	    multiple:true,
	    onLoadSuccess:function(node,data){  
	        var t = $("#cc").combotree('tree');//获取tree  
	         for (var i=0;i<data.length ;i++ ){  
	            node= t.tree("find",data[i].id);  
	            t.tree('expandAll',node.target);//展开所有节点  
	         }
	    }
	    
	});  
	
	$('#com').linkbutton({    
	    onClick:function(){
	    	var t = $('#cc').combotree('tree');	
	    	var n = t.tree('getSelected');	 
	    	console.log(n)
	    }
	});  


		


})
</script>
<body>
	<div id="win"  class="easyui-window" title="新增角色" style="width:600px;height:400px"	>
		角色名<input id='rname' class="easyui-textbox" data-options="iconCls:'icon-search'" style="width:300px"> 
		拥有功能<input id="cc" >  
	<a id="com" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">确认</a>  

	<a id="can" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">取消</a>  

	

		

		
		
	
	</div> 
	
</body>
</html>